<div class="row" id="reply_<?php echo $postReply->id?>" 
post_id="<?php echo $postReply->post_id?>" 
reply_parent_id="<?php echo $postReply->parent_id ? $postReply->parent_id : $postReply->id?>">
    <div class="col-sm-4<?php if($postReply->parent_id):?> col-sm-offset-4<?php endif?> user">
        <div class="row">
            <div class="col-xs-8 col-sm-24 avatar">
                <a href="#">
                    <img class="thumbnail marginbottom5" src="<?php echo $postReply->user->getAvatarUrl()?>"/>
                </a>
            </div>
            <div class="col-xs-16 col-sm-24">                                                               
                <ul class="list-unstyled">
                    <li><a href="#" title="Tới trang nhà của <?php echo CHtml::encode($postReply->user->name)?>" rel="tooltip" class="label label-primary"><?php echo $postReply->user->name?></a></li>
                    <li class="text-small"><abbr title="Ngày tham gia" rel="tooltip" ><i class="fa fa-calendar"></i></abbr> <span class="text-mini text-muted initialism"><?php echo MyDateTime::datetimeFormat($postReply->user->created, true)?></span></li>
                    <li class="text-small"><abbr title="Theo dõi, kết bạn với <?php echo CHtml::encode($postReply->user->name)?>" rel="tooltip" ><i class="fa fa-smile-o"></i></abbr> <a href="#">Follow</a> <span class="text-muted text-mini">(<span class="text-bold">12</span>)</span></li>
                    <li class="text-small"><abbr title="Nhắn tin tới <?php echo CHtml::encode($postReply->user->name)?>" rel="tooltip" ><i class="fa fa-comments-o"></i></abbr> <a href="#" rel="tooltip">Nhắn tin</a></li>
                </ul>
            </div>
         </div>
         <hr class="visible-xs margintop5 marginbottom10 border-dashed"/>    
    </div>
    <div class="<?php echo $postReply->parent_id ? 'col-sm-16' : 'col-sm-20'?>">
        <?php if($postReply->reply_id):?>
            <div class="text-bold">@<?php echo $postReply->postReplyReply->user->name?>:</div> 
        <?php endif?>

        <div class="reply-content">
            <?php echo $postReply->content?>
        </div>

        <?php if($postReply->postImages):?>
            <div class="panel panel-simple marginbottom0 margintop10 panel-img-attachment">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-picture-o"></i> Ảnh đính kèm</h3>
                </div>
                <div class="panel-body">
                    <div class="image-gallery">
                        <?php foreach($postReply->postImages as $image):?>
                            <span class="image-item">
                                <a href="<?php echo $image->url?>" title="<?php echo $this->domain?>: <?php echo CHtml::encode($postReply->post->title)?>" download="<?php echo $image->image?>" data-gallery>
                                    <img src="<?php echo $image->getUrl('small')?>" alt="<?php echo $this->domain?>: <?php echo CHtml::encode($postReply->post->title)?>">
                                </a>
                            </span>
                            <?php endforeach?>
                    </div>
                </div>
            </div>
        <?php endif?>

        <div class="margintop5">
            <span class="text-muted text-small">Thời gian: <?php echo MyDateTime::relative($postReply->created)?></span>
        </div>
        
        <div class="margintop10 clearfix">
        <?php if($postReply->checkUserPermisstion()):?>

            <div class="pull-left">
                <button type="button" class="btn btn-danger btn-xs confirm-delete-reply" reply_id="<?php echo $postReply->id?>" rel="<?php echo $this->createUrl('/hangve/post/replyDelete', array('reply_id' => $postReply->id))?>">
                    <i class="fa fa-trash-o"></i> Xóa
                </button>
                <a class="btn btn-warning btn-xs" href="<?php echo $this->createUrl('/hangve/post/replyUpdate', array('reply_id' => $postReply->id))?>">
                    <i class="fa fa-edit"></i> Sửa
                </a>
            </div>
        <?php endif?>
            
            <div class="pull-right">
                <button rel="tooltip" title="Gửi trả lời tới thành viên @<?php echo $postReply->user->name?>" class="btn btn-xs btn-info post-reply <?php if(!$this->user):?>require-login<?php endif?>" reply_id="<?php echo $postReply->id?>" user_name="<?php echo $postReply->user->name?>">
                    <i class="fa fa-reply"></i> Trả lời
                </button>
            </div>
        </div>
        <hr class="margintop10 marginbottom5 border-dashed" />
        <div class="text-small text-muted">
            htc nexus one=>galaxy s1=>ip4 =>galaxy hoppin m190s =>sky a770=>sh12c=>sh01d=>sh06d=>panasonic eluga=>ip4s +ipad 2=>optimus G + ipad mini: 01677749997
        </div> 
    </div>
</div>
<hr class="border-danger" />